You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): show push alerts while the open chat is reconnecting - #41625
While the app is in the foreground, foregroundNotificationBehavior silences any agent notification whose deep link matches the thread on screen, on the assumption that the live feed already shows the event. That assumption fails when the thread on screen is not live: the environment is reconnecting, or the thread is showing its cached copy while it catches up. In that state the "turn finished" or "needs your input" notification is suppressed, and the screen doesn't show the event either, so the user gets no sign of it until the feed recovers.
Expected: the notification stays silent only when the thread on screen is connected and its feed is live. Otherwise it shows like any other notification.
Change
foregroundNotificationBehavior takes a hasLiveFeed(deepLink) check and suppresses only when the target is the thread on screen and that check passes.
notificationNavigation.ts passes a check that reads the app's atom registry. It returns true only when the environment's presentation phase is connected and the thread's detail state is live. The detail is read only if the thread screen already holds it (appAtomRegistry.getNodes().has(...), the same guard threadPromptLink.ts uses), so a notification never starts loading a thread.
New foregroundNotificationBehavior.test.ts with two cases: silent when the feed is live, shown when it isn't.
Scope
Small mobile bug fix; no tracking issue.
Verification
How I found it: a bug hunt over a fork of T3 Code, where alerts for the open chat went missing while the phone reconnected.
RED on origin/main (1002934541): vp test run src/features/agent-awareness/foregroundNotificationBehavior.test.ts in apps/mobile: 1 failed | 1 passed (2); "shows the alert while the thread on screen is cached or reconnecting" fails with expected false to be true on shouldShowBanner.
GREEN on this branch: same file 2 passed (2); src/features/agent-awareness/ 41 passed (41).
Checks: effect-tsgo tsrs --noEmit in apps/mobile, vp lint on the folder, and the pre-commit vp fmt, vp lint and knip:check all passed.
Agent: GPT-6.2 Sol (Codex) found and fixed this in a fork of T3 Code; Claude Opus 5.5 (Claude Code) ported and tested it here.
No actionable comments were generated in the recent review.
Walkthrough
Foreground notification handling now checks whether the on-screen thread has a live feed before suppressing a matching notification. The notification handler supplies the feed check, which requires a connected environment and a held thread atom with live status.
Changes: Foreground notifications
Layer / File(s)
Summary
Resolve live-feed status apps/mobile/src/features/agent-awareness/notificationNavigation.ts
The new helper parses the deep link and returns false when required identifiers are missing, the environment is disconnected, or the thread atom is not held. Otherwise, it checks whether the thread value has live status.
The notification handler passes the live-feed check to the foreground behavior function. The function suppresses a matching notification only when the check returns true. Tests cover live and non-live feed results.
pingdotgg/t3code#12045: Adds the iOS foreground notification handler whose suppression behavior this change updates.
Suggested reviewers:macroscopeapp
Merge Risk: Minimal · up to 5b57d
Foreground alerts now show when the open thread has no live feed, such as during reconnects or catch-up. The change is small and tested, and no merge-blocking risk is identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(mobile): show push alerts while the open chat is reconnecting" follows conventional commit format and names the main change: foreground push alerts for the open thread are no longer sup…
Description check
The description follows the template sections (Problem, Change, Scope, Verification) and fills each one with specific content. The Problem explains the suppression bug and expected behavior. The Chang…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(mobile): show push alerts while the open chat is reconnecting" follows conventional commit format and names the main change: foreground push alerts for the open thread are no longer suppressed while the thread is reconnecting or showing cached data. The changeset adds a hasLiveFeed check to foregroundNotificationBehavior and wires it through notificationNavigation.ts, which matches the title.
Full details: Description check
Explanation
The description follows the template sections (Problem, Change, Scope, Verification) and fills each one with specific content. The Problem explains the suppression bug and expected behavior. The Change lists the new hasLiveFeed check, the atom registry guard, and the new test file. Scope explains this is a small bug fix with no tracking issue. Verification gives RED and GREEN test results and the commands run. The template's conventional-commit reminder and agent line are handled by the author's title and the final Agent line. One gap: the Verification section does not state what was not checked, which the template asks for. The description also does not link an issue or explain why one is absent beyond 'no tracking issue'. These gaps are minor.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:M30-99 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
While the app is in the foreground,
foregroundNotificationBehaviorsilences any agent notification whose deep link matches the thread on screen, on the assumption that the live feed already shows the event. That assumption fails when the thread on screen is not live: the environment is reconnecting, or the thread is showing its cached copy while it catches up. In that state the "turn finished" or "needs your input" notification is suppressed, and the screen doesn't show the event either, so the user gets no sign of it until the feed recovers.Expected: the notification stays silent only when the thread on screen is connected and its feed is live. Otherwise it shows like any other notification.
Change
foregroundNotificationBehaviortakes ahasLiveFeed(deepLink)check and suppresses only when the target is the thread on screen and that check passes.notificationNavigation.tspasses a check that reads the app's atom registry. It returns true only when the environment's presentation phase isconnectedand the thread's detail state islive. The detail is read only if the thread screen already holds it (appAtomRegistry.getNodes().has(...), the same guardthreadPromptLink.tsuses), so a notification never starts loading a thread.foregroundNotificationBehavior.test.tswith two cases: silent when the feed is live, shown when it isn't.Scope
Small mobile bug fix; no tracking issue.
Verification
origin/main(1002934541):vp test run src/features/agent-awareness/foregroundNotificationBehavior.test.tsinapps/mobile: 1 failed | 1 passed (2); "shows the alert while the thread on screen is cached or reconnecting" fails withexpected false to be trueonshouldShowBanner.src/features/agent-awareness/41 passed (41).effect-tsgo tsrs --noEmitinapps/mobile,vp linton the folder, and the pre-commitvp fmt,vp lintandknip:checkall passed.Agent: GPT-6.2 Sol (Codex) found and fixed this in a fork of T3 Code; Claude Opus 5.5 (Claude Code) ported and tested it here.